package chans

import (
	"fmt"
	"strings"
	"time"

	"gitee.com/injoyai/goutil/crypt/md5"
)

func UID() string {
	c := make(chan string, 1)
	defer close(c)
	GetQueueFunc("uid").Do(func(no, num int) {
		c <- strings.ToUpper(md5.Encrypt(fmt.Sprintf("%d#%d#%d", time.Now().UnixNano(), no, num)))
	})
	return <-c
}
